package llama.network;

import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashMap;

import llama.core.Contact;
import llama.core.ContactList;
import llama.core.LoginCredentials;
import llama.core.Message;
import llama.core.ORMLiteUser;
import llama.core.SearchResults;
import llama.core.SearchTerm;
import llama.core.UserList;

import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryonet.EndPoint;

/**
 * Needed by KryoNet to register which classes to send over the network.
 */
public class NetworkRegistration {

	public static void register (EndPoint endPoint){
		Kryo kryo = endPoint.getKryo();
		kryo.register(Message.class);
		kryo.register(LoginCredentials.class);
		kryo.register(ORMLiteUser.class);
		kryo.register(NetworkMessage.class);
		kryo.register(NetworkMessage.Type.class);
		kryo.register(SearchTerm.class);
		kryo.register(Contact.class);
		kryo.register(ContactList.class);
		kryo.register(ArrayList.class);
		kryo.register(UserList.class);
		kryo.register(Date.class);
		kryo.register(SearchResults.class);
		kryo.register(LinkedHashMap.class);
	}

	
}

